package com.xpalive.config.mybatis.toolkit;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.xpalive.utils.beans.XBeanUtils;

public class LambdaQueryWrapperProxy<T> extends LambdaQueryWrapper<T> {

    /**
     * 不建议直接 new 该实例，使用 Wrappers.lambdaQuery(entity)
     */
    public LambdaQueryWrapperProxy(Class<T> entityClass) {
        super(entityClass);
    }

    @Override
    public LambdaQueryWrapper<T> eq(SFunction<T, ?> column, Object val) {
        return eq(XBeanUtils.isNotBlank(val), column, val);
    }
}
